package cn.stylefeng.guns.sys.modular.importHelper;

import org.springframework.web.multipart.MultipartFile;

public class ExcelConfig {
	
	private MultipartFile file;
	private int sheetIndex;
	private int startRowIndex;
	private int endRowIndex;
	private int startColumnIndex;
	private int endColumnIndex;
	private String tableName;
	/**
	 * 批量提交数量
	 */
	private int batchSize = 10;
	
	public ExcelConfig(MultipartFile file, int sheetIndex, int startRowIndex, int endRowIndex, int startColumnIndex,
			int endColumnIndex, String tableName) {
		super();
		this.file = file;
		this.sheetIndex = sheetIndex;
		this.startRowIndex = startRowIndex;
		this.endRowIndex = endRowIndex;
		this.startColumnIndex = startColumnIndex;
		this.endColumnIndex = endColumnIndex;
		this.tableName = tableName;
	}
	
	public ExcelConfig(MultipartFile file, Object[] indexConfig) {
		super();
		this.file = file;
		this.sheetIndex = (int) indexConfig[0];
		this.startRowIndex = (int) indexConfig[1];
		this.endRowIndex = (int) indexConfig[2];
		this.startColumnIndex = (int) indexConfig[3];
		this.endColumnIndex = (int) indexConfig[4];
		this.tableName = (String) indexConfig[5];
	}

	public MultipartFile getFile() {
		return file;
	}

	public void setFile(MultipartFile file) {
		this.file = file;
	}

	public int getSheetIndex() {
		return sheetIndex;
	}

	public void setSheetIndex(int sheetIndex) {
		this.sheetIndex = sheetIndex;
	}

	public int getStartRowIndex() {
		return startRowIndex;
	}

	public void setStartRowIndex(int startRowIndex) {
		this.startRowIndex = startRowIndex;
	}

	public int getStartColumnIndex() {
		return startColumnIndex;
	}

	public void setStartColumnIndex(int startColumnIndex) {
		this.startColumnIndex = startColumnIndex;
	}

	public int getEndColumnIndex() {
		return endColumnIndex;
	}

	public void setEndColumnIndex(int endColumnIndex) {
		this.endColumnIndex = endColumnIndex;
	}

	public int getEndRowIndex() {
		return endRowIndex;
	}

	public void setEndRowIndex(int endRowIndex) {
		this.endRowIndex = endRowIndex;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public int getBatchSize() {
		return batchSize;
	}

	public void setBatchSize(int batchSize) {
		this.batchSize = batchSize;
	}
	
}
